package org.snail.employee.bean;

import lombok.Data;
import lombok.ToString;
import org.snail.excel.annotation.ExcelBean;
import org.snail.excel.annotation.ExcelColumn;

import java.util.Date;

@Data
@ToString
@ExcelBean
public class EmployeesPhoneDTO {
    @ExcelColumn(name = "name", position = 1, columnName = "姓名")
    private String name;
    // /手机号
    @ExcelColumn(name = "phone", position = 2, columnName = "手机号")
    private String phone;
    //工号
    @ExcelColumn(name = "workNum", position = 6, columnName = "工号")
    private String workNum;
    //外包工号
    @ExcelColumn(name = "outNum", position = 5, columnName = "外包工号")
    private String outNum;

    //状态
    private int state;
    //创建人
    private String createBy;
    //创建时间
    private Date createTime;
    //修改人
    private String updateBy;
    //修改时间
    private Date updateTime;
    //是否删除
    private int isDel;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof EmployeesPhoneDTO)) return false;

        EmployeesPhoneDTO that = (EmployeesPhoneDTO) o;

        if (getName() != null ? !getName().equals(that.getName()) : that.getName() != null) return false;
        if (getPhone() != null ? !getPhone().equals(that.getPhone()) : that.getPhone() != null) return false;
        if (getWorkNum() != null ? !getWorkNum().equals(that.getWorkNum()) : that.getWorkNum() != null) return false;
        return getOutNum() != null ? getOutNum().equals(that.getOutNum()) : that.getOutNum() == null;

    }

    @Override
    public int hashCode() {
        int result = getName() != null ? getName().hashCode() : 0;
        result = 31 * result + (getPhone() != null ? getPhone().hashCode() : 0);
        result = 31 * result + (getWorkNum() != null ? getWorkNum().hashCode() : 0);
        result = 31 * result + (getOutNum() != null ? getOutNum().hashCode() : 0);
        return result;

    }
}